//战斗中断缓存
"use strict"
const mvc = require("cosjs.mvc")
const dbase = mvc.model.require("dbase");


exports.set = async function (sid, uid) {
  let date = new Date();
  let _h = date.getHours();
  let set = new dbase.set(sid, getDatePre(_h));
  let _ttl = await set.ttl();
  if (_ttl == -1) {
    await set.expire(TTL);
  }
  set.set(uid);
}


exports.get = async function (sid, uid) {
  let date = new Date();
  let _h = date.getHours();
  let set = new dbase.set(sid, getDatePre(_h));
  let _ttl = await set.ttl();
  if (_ttl == -1) {
    await set.expire(TTL);
  }
  set.set(uid);
}


module.exports = function (sid) {
  return new dbase.gzone.cache(sid, "dailyCache", "string");
}

